/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package thinkinginjava.svn.typeinformation;

import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author public_enemy
 */

class Candy {
    static {
        System.out.println("Loading Candy");
    }
}

class Cookie {
    static {
        System.out.println("Loading Cookie");
    }
}
class  Gum{
    static {
        System.out.println("Loading GUM");
    }
}
public class SweetShop {
    public static void main(String[] args) {
        System.out.println("Inside Main()");
        new Candy();
        System.out.println("After creating Candy");
        try {
            //try {
                Class.forName("thinkinginjava.svn.typeinformation.Gum");
        } catch (ClassNotFoundException ex) {
            Logger.getLogger(SweetShop.class.getName()).log(Level.SEVERE, null, ex);
        }
        //} catch(ClassNotFoundException e) {
        //    System.out.println("Could not find Gum");                
        //}
        System.out.println("After Class.forName(\"Gum\")");
        new Cookie();
        System.out.println("After creating Cookie");
    }
}
